<template>
  <div style="width:98%;height: 100%;">
    <el-card class="box-card" shadow="always">
      <div class="search_add">
        <el-row>
          <el-col :span="3">
            <el-input
                placeholder="请输入内容"
                prefix-icon="el-icon-search"
                v-model="input2">
            </el-input>
          </el-col>
          <el-col :span="1">
            <el-button type="primary">添加用户</el-button>
          </el-col>
        </el-row>
      </div>
      <el-table
          :data="tableData"
          border
          style="width: 100%">
        <el-table-column
            type="index"
            label="#"
            width="70">
        </el-table-column>
        <el-table-column
            prop="date"
            label="日期"
            width="180">
        </el-table-column>
        <el-table-column
            prop="name"
            label="姓名"
            width="180">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址">
        </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button
                size="mini"
                @click="handleEdit(scope.$index, scope.row)">编辑
            </el-button>
            <el-button
                size="mini"
                type="danger"
                @click="handleDelete(scope.$index, scope.row)">删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "Test1",
  data() {
    return {
      dialogVisible: false,
      dialogVisible2: false,
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    handleClose(done) {
      this.$confirm('确认关闭？')
          .then(e => {
            console.log(e)
            done();
          })
          .catch(e => {
            console.log(e)
          });
    }
  }
}
</script>

<style scoped>
.box-card {
  margin-top: 4px;
  /*box-shadow: 10px 10px 3px gray;*/
}

.search_add {
  /*display: flex;*/
  box-sizing: border-box;
  margin-top: 10px;
  margin-bottom: 10px;
}
</style>
